﻿<%

Class Cls_Setting
	
	Dim vLanguage
	Dim vUpdatepath

	Private Sub Class_Initialize()
		vLanguage = "zh-cn"
		vUpdatepath = False
	End Sub

	Public Function UpDate()

		Call ChkLogin("setting")

		Dim Rs,GetValue
		Set Rs = DB("Select [Title],[Name],[Value],[Data] From [{pre}Config]",3)
		Do While Not Rs.Eof
			GetValue = Request.Form("o" & Rs(1) & "")
			Select Case LCase(Rs(3))
			Case "int" : If Len(GetValue) = 0 Or Not IsNumeric(GetValue) Then GetValue = 0
			End Select
			Rs(2) = GetValue
			Rs.Update
			Rs.MoveNext
		Loop
		Rs.Close : Set Rs = Nothing
		Call Refresh()
		UpDate = True
	End Function

	Public Function Refresh()
		call saveconfig() ' 生成配置文件
		call createchannelcache() ' 更新栏目缓存
		call clscache() ' 清空缓存
		Refresh = True
	End Function
End Class
%>